Spring.Core Send comments on this topic.
GetMessage(String,CultureInfo,Object[]) Method
See Also 
Spring.Context Namespace > IMessageSource Interface > GetMessage Method : GetMessage(String,CultureInfo,Object[]) Method


name
The name of the message to resolve.
culture
The CultureInfo that represents the culture for which the resource is localized.
arguments
The array of arguments that will be filled in for parameters within the message, or a null reference (Nothing in Visual Basic) if there are no parameters within the message. Parameters within a message should be referenced using the same syntax as the format string for the Format method.
Resolve the message identified by the supplied name.

Syntax

Visual Basic (Declaration) 
Overloads Overridable Function GetMessage( _
   ByVal name As String, _
   ByVal culture As CultureInfo, _
   ByVal ParamArray arguments() As Object _
) As String
Visual Basic (Usage)Copy Code
Dim instance As IMessageSource
Dim name As String
Dim culture As CultureInfo
Dim arguments() As Object
Dim value As String
 
value = instance.GetMessage(name, culture, arguments)
C# 
virtual string GetMessage( 
   string name,
   CultureInfo culture,
   params object[] arguments
)

Parameters

name
The name of the message to resolve.
culture
The CultureInfo that represents the culture for which the resource is localized.
arguments
The array of arguments that will be filled in for parameters within the message, or a null reference (Nothing in Visual Basic) if there are no parameters within the message. Parameters within a message should be referenced using the same syntax as the format string for the Format method.

Return Value

The resolved message if the lookup was successful (see above for the return value in the case of an unsuccessful lookup).

Remarks

Note that the fallback behavior based on CultureInfo seem to have a bug that is fixed by installed .NET 1.1 Service Pack 1.

If the lookup is not successful, implementations are permitted to take one of two actions.

  • Throw an exception.
  • Return the supplied name as is.

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also